package com.ruoyi.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.domain.CwDealPerDayDetail;
import com.ruoyi.domainVo.TCwDealPerDayVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.TCwDealPerDayMapper;
import com.ruoyi.domain.TCwDealPerDay;
import com.ruoyi.service.ITCwDealPerDayService;

/**
 * 营业报表Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-24
 */
@Service
public class TCwDealPerDayServiceImpl implements ITCwDealPerDayService 
{
    @Autowired
    private TCwDealPerDayMapper tCwDealPerDayMapper;

    /**
     * 查询营业报表
     * 
     * @param tCwDealPerDay 营业报表主键
     * @return 营业报表
     */
    @Override
    public List<CwDealPerDayDetail> selectTCwDealPerDayById(TCwDealPerDayVo tCwDealPerDay)
    {
        return tCwDealPerDayMapper.selectTCwDealPerDayById(tCwDealPerDay);
    }

    /**
     * 查询营业报表列表
     * 
     * @param tCwDealPerDay 营业报表
     * @return 营业报表
     */
    @Override
    public List<TCwDealPerDay> selectTCwDealPerDayList(TCwDealPerDayVo tCwDealPerDay)
    {
        return tCwDealPerDayMapper.selectTCwDealPerDayList(tCwDealPerDay);
    }



    /**
     * 修改营业报表
     * 
     * @param tCwDealPerDay 营业报表
     * @return 结果
     */
    @Override
    public int updateTCwDealPerDay(TCwDealPerDay tCwDealPerDay)
    {
        tCwDealPerDay.setUpdateTime(DateUtils.getNowDate());
        return tCwDealPerDayMapper.updateTCwDealPerDay(tCwDealPerDay);
    }
    /**
     * 查询  需要计算的数据
     * @param operationType
     * @return
     */
    @Override
    public List<TCwDealPerDay> selectTCwDealPerDayListByCalculate(Long operationType) {
        return tCwDealPerDayMapper.selectTCwDealPerDayListByCalculate(operationType);
    }


}
